#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);








    //初始化数据库设置
    m_db = db;

    m_adminModel.setTable("tb_admin");
    m_resourceModel.setTable("tb_resource");

    ui->tvAdmin->setModel(&m_adminModel);
    ui->tvResource->setModel(&m_resourceModel);

}

MainWindow::~MainWindow()
{

    delete ui;
}

